//引入模块
const express = require("express");
const bodyParser =  require("body-parser");


//创建服务
let server = express();

//静态资源  以src为根目录
server.use(express.static("./../src"));


// 配置中间键
server.use(bodyParser.urlencoded({extended:false}));
server.use(bodyParser.json());

//配置路由 

//登录注册的路由
server.use("/account",require("./router/accountRouter").router);

//购物车的路由
server.use("/cart",require("./router/cartRouter").router);

//设置监听
server.listen(8080,()=>{
    console.log("服务启动完毕 http://127.0.0.11:8080");
})